package com.ruoyi.web.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.annotation.DataColumn;
import com.ruoyi.common.annotation.DataPermission;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.web.domain.BhPlans;
import com.ruoyi.web.domain.query.DangerPageQuery;
import com.ruoyi.web.domain.query.TemporaryCheckPageQuery;
import com.ruoyi.web.domain.vo.BhPlansPageVO;
import com.ruoyi.web.domain.vo.DangerPageVO;
import com.ruoyi.web.domain.vo.TemporaryCheckVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BhPlansMapper extends BaseMapperPlus<BhPlansMapper, BhPlans, BhPlansPageVO> {
    int deleteBhPlans(Integer id);

    BhPlans selectByPrimaryKey(Integer id);

    List<BhPlans> getOtherPlan(BhPlans mainPlan);

    BhPlans getMainPlan(BhPlans getMainParam);

    @DataPermission({
        @DataColumn(key = "deptName", value = "br.co_id")
    })
    Page<DangerPageVO> getDangerPage(Page<Object> build, @Param(Constants.WRAPPER) Wrapper<DangerPageQuery> queryWrapper);

    Page<DangerPageVO> getCheckPage(Page<Object> build, DangerPageQuery dangerPageQuery);

    @DataPermission({
        @DataColumn(key = "deptName", value = "br.co_id")
    })
    List<BhPlans> getShowList(@Param(Constants.WRAPPER) Wrapper<BhPlans> queryWrapper);

    Page<TemporaryCheckVO> getTemporaryCheckPage(Page<Object> build, @Param(Constants.WRAPPER) QueryWrapper<TemporaryCheckPageQuery> wrapper);

    TemporaryCheckVO getTemporaryCheckDetail(Integer id);

    @DataPermission({
        @DataColumn(key = "deptName", value = "br.co_id")
    })
    List<DangerPageVO> getDangerBulletin(@Param(Constants.WRAPPER) Wrapper<Object> wrapper);
}
